/**
 * @desc 创建一个类变量
 * @method set 设置值
 * @method get 获取值
 */

function MemberValue(obj, prop = '') {

    /**
     * @desc any obj类
     */
    this.obj = obj;

    /**
     * @desc any 属性
     */
    this.prop = prop;
};

MemberValue.prototype = {

    ...MemberValue.prototype,

    set: function (value) {

        this.obj[this.prop] = value;
    },

    get: function () {

        return this.obj[this.prop];
    }
};

module.exports = MemberValue

